package vip.xiaomoli.nurse.model;

public class Api {

    private Class<?> apiClass;

    private String methodName;

    public Api(Class<?> apiClass, String methodName) {
        this.apiClass = apiClass;
        this.methodName = methodName;
    }

    public Class<?> getApiClass() {
        return apiClass;
    }

    public String getMethodName() {
        return methodName;
    }

    @Override
    public String toString() {
        return apiClass.getName() + "." + methodName;
    }

    @Override
    public int hashCode() {
        return toString().hashCode();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Api api = (Api) o;
        return toString().equals(api.toString());
    }

}
